-
-
Notifications
You must be signed in to change notification settings - Fork 72
[WIP] Progress on upwindig rules (issue 355) #390
Conversation
So far, cases like the following can be parsed and solved:
All these cases use Dirichlet BCs. |
How's this going @emmanuellujan ? Let me know if you need help resolving conflicts. I didn't change anything around the lines you changed, just indented |
I have been working on other projects. Next week I can resume this PR, and resolve these conflicts :-) |
…e executed in runtests.jl.
…ives with a centered scheme instead of upwind, ergo, it is not ready to be added to runtests.jl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty sensible so far. Note #405 took care of the IntervalDomain
/Interval
change
# *(~~a..., ~~b..., dot(reverse_weights(II,j),depvars[k][central_neighbor_idxs(II,j)[1:2]])), | ||
# *(~~a..., ~~b..., dot(forward_weights(II,j),depvars[k][central_neighbor_idxs(II,j)[2:3]])))) | ||
# for j in 1:nspace, k in 1:length(pdesys.depvars)] | ||
upwinding_rules_tmp = [@rule(*(~~a,$(Differential(iv)),~~b) => IfElse.ifelse(*(~~a..., ~~b...,)>0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ifelse will work if a
and b
can be evaluated. But what if they are dependent variables (e.g. velocity in Navier-Stokes)?
forward_weights(II,j) = DiffEqOperators.calculate_weights(discretization.upwind_order, 0.0, grid[j][[II[j],II[j]+1]]) | ||
#forward_weights(II,j) = -1.0 * reverse_weights(II,j) # TODO: check this function | ||
side = 1.0 | ||
upwinding_rules_tmp = [@rule(*(~~a,$(Differential(iv))(dv),~~b) => Base.ifelse(*(side, ~~a..., ~~b...,)>0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to flip, I think you need @acrule
@shashi ?
Hi @shashi, I need to create a rule like the following: @rule *(~~a, $(Differential(r))(u(x)), ~~b) => "success" where |
@YingboMa instead of using rule can we use something to get the coefficient of |
I don't get how this is different... |
v(x) needs to be evaluated to get a value, but -1.0 is directly a parameter |
Do you intend to finish this this week or is it just cookie licking now? |
No description provided.